<?php
namespace app\user\validate\user;

use think\Validate;

/**
 * 用户验证
 */
class Income extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'    =>    ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'wxpay_openid'      => 'require',
        'alipay_user_name'  => 'require',
        'alipay_account'    => 'require|number',
    ];

    protected $field = [
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名'    =>    '错误信息'
     *
     * @var array
     */
    protected $message = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'to_wxpay'      => ['money', 'verify_code'],   // , 'wxpay_openid' PC端不需要
        'to_alipay'     => ['money', 'verify_code', 'alipay_user_name', 'alipay_account'],
        'to_balance'    => ['money'],
    ];

}
